Builder

class Builder<C : Any>

Builds error entries. This is used in the UnaryOperator pattern seen in several places in this class, but can be used "freely" with builder

Author

fzzyhmstrs

Since

0.7.0

Parameters

C

Non-null error type being built

type

Type the type of this error builder

Functions

Link copied to clipboard

Adds a child entry to this builder. When this entry is built, this child will be attached to it.

Adds a child entry to this builder from the provided ValidationResult. When this entry is built, this child will be attached to it.

Link copied to clipboard

Builds an ErrorEntry from provided inputs. Usually you don't have to do this yourself.

Link copied to clipboard

The content of this entry. For string-based errors, use this instead of message

Link copied to clipboard

If this error is caused by a thrown exception, adds it to the entry

Link copied to clipboard

Adds a header message to this error entry. This will prompt the builder to create a parent entry, and the actual entry being built will be its first child.

Link copied to clipboard

Adds a string-based message to a non-string error type. Should not be used with string-based error (most of them)